<?php $groups = Doctrine::getTable('BbGroups')->fetchall(array('s_id'=>$seasonId))?>
<?php $season = Doctrine::getTable('BbSeason')->findOneBySId($seasonId)?>
<?php $league = Doctrine::getTable('BbLeague')->findOneById($season->getLId())?>
<?php $left=1; ?>

<div class="column-left">
	 <div class="news-title"><?php echo $league." :: ".$season ?></div>
  	</br> 
	<?php foreach ($groups as $group):?>
	<?php $groupTeamsId = Doctrine::getTable('BbGrteams')->fetchArray(array('g_id'=>$group->getId())) ?>
    <div class="<?php  if ($left==1)  echo "left";  else echo "right"; ?>" style="width:48%;">
      <h3 style="color:#fff;"><?php echo $group ?></h3>
      <div class="box-wrap mod-list">
          <ul>
            <?php foreach ($teams as $team):?>
            <?php if(in_array($team->getId() , $groupTeamsId)) {?>
        			<li class="first">
        			  <?php echo image_tag("/uploads/team/".$team->getDefImg(), array('alt'=>$team, 'style'=>'max-width:150px;max-height:150px;float:left;margin:5px 5px 5px 5px;padding: 7px 7px 7px 7px;border:1px solid #eee;'))?>
            		  <div><!-- class="logo-team-medium">-->
         				  <h5 align="center"><a class="bi" href="/teams/<?php echo $team?>"><?php echo $team?></a></h5>
            			</div>
          		</li>
            <?php } endforeach?>
          </ul>
      </div>
    </div>
    
	<?php $left = $left!=1 ? 1 :0 ; endforeach?>
</div><!--column-left-->

<?php include_partial('main/right', array());?>

<br clear="all">
